package com.tinyseed.emcp.api.exception.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.tinyseed.hmxx.common.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @ClassName ExceptionStatistics
 * @Deacription 异常统计表
 * @Author Clare.Zhuang
 * @Date 2020/5/1 22:15
 * @Version 1.0
 **/

@Data
@Table(name = "tb_exception_statistics")
@Entity()
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class ExceptionStatistics implements Serializable {

    /**
     * 唯一主键
     */
    @Id
    @SequenceGenerator(name = "tb_exception_statistics_sequence", sequenceName = "tb_exception_statistics_sequence", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_exception_statistics_sequence")
    private Long id;

    /**
     * 异常描述
     */
    @Column(name = "description")
    private String description;

    /**
     * 异常类型
     */
    @Column(name = "event_type")
    private String eventType;

    /**
     * 企业名称
     */
    @Column(name = "enterprise_name")
    private String enterpriseName;

    /**
     * 企业id
     */
    @Column(name = "enterprise_id")
    private Long enterpriseId;

    /**
     * 组织名称
     */
    @Column(name = "origanize_name")
    private String organizeName;

    /**
     * 组织机构id
     */
    @Column(name = "origanize_id")
    private Long organizeId;

    /**
     * 治污监测点名称
     */
    @Column(name = "monitor_name")
    private String monitorName;

    /**
     * 治污监测点id
     */
    @Column(name = "monitor_id")
    private String monitorId;

    /**
     * 监测点类型
     */
    @Column(name = "equipment_type")
    private String equipmentType;

    /**
     * sms下发状态(Y：已下发 N：未下发)
     */
    @Column(name = "sms_issued_status")
    private String smsIssuedStatus;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Timestamp createTime;

    /**
     * 最后修改时间
     */
    @Column(name = "modify_time")
    private Timestamp modifyTime;

    /**
     * 创建人
     */
    @Column(name = "creator")
    private String creator;

    /**
     * 最后操作人
     */
    @Column(name = "modifier")
    private String modifier;

    /**
     * 计数
     */
    @Column(name = "count")
    private Long count;

    /**
     * 产污监测点名称
     */
    @Column(name = "produce_name")
    private String produceName;

    /**
     * 产污监测点id
     */
    @Column(name = "produce_id")
    private String produceId;

    /**
     * 用备关系
     */
    @Column(name = "relation")
    private String relation;

}
